package com.douyang.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.douyang.pojo.UserRole;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface UserRoleMapper  extends BaseMapper<UserRole> {

    @Select("select r.role_name from role as r inner join user_role ur on r.id = ur.role_id where ur.user_id=#{userId}")
    List<String> getUserRole(@Param("userId") Long userId);
}
